{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "t1 = ()\n",
    "t2 = (11,22,33)\n",
    "t3 = tuple([1,2,3,4])\n",
    "t4 = tuple(\"abc\")\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "dict1 = {\n",
    "    'name':'Xbmd',\n",
    "    'location':'lanzhou'\n",
    "}\n",
    "\n",
    "\n",
    "dict2 = dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4098"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dict2.clear()\n",
    "dict2 = dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n",
    "dict2.pop('jack')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dict2['jack-again'] = 'dict'\n",
    "dict2['jack-again'] = 'dict-again'\n",
    "books = dict([('title', 'Python 入门'), ('author', 'jack'), ('price', 68)])\n",
    "type(books.keys())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "未成年\n"
     ]
    }
   ],
   "source": [
    "age = 45\n",
    "if age>=18:\n",
    "      if age <35:\n",
    "       print('青年')\n",
    "else:\n",
    " print('中老年')\n",
    " \n",
    "print('未成年')"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "3beccce4ce41e1547049ed455dd2b068221f54a61fc44b63e6db4e9dbf858918"
  },
  "kernelspec": {
   "display_name": "Python 3.8.5 64-bit",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
